Skip to content

Updated navbar to use latest design.#617

Open
Randy808 wants to merge 1 commit intoBlockstream:masterfrom
Randy808:nav-redesign
Open

Updated navbar to use latest design.#617
Randy808 wants to merge 1 commit intoBlockstream:masterfrom
Randy808:nav-redesign

Conversation

@Randy808
Copy link
Copy Markdown
Collaborator

@Randy808 Randy808 commented Apr 9, 2026

To run locally, npm install and use the following snippets:

# Bitcoin
export API_URL=https://blockstream.info/api
export PORT=4999
source flavors/blockstream/config.env
source flavors/bitcoin-mainnet/config.env
npm run dev-server
# Liquid
export API_URL=https://blockstream.info/liquid/api
export PORT=5000
source flavors/blockstream/config.env
source flavors/liquid-mainnet/config.env
npm run dev-server

Mainnet

Current design:
bitcoin (old)

New design:
bitcoin (new)

Liquid light-theme

Testnet

Current design:
bitcoin testnet (old)

New design:
bitcoin testnet (new)

@Randy808 Randy808 changed the title Updated the navbar to use the newest designs. Updated navbar to use latest design. Apr 9, 2026
@Randy808 Randy808 force-pushed the nav-redesign branch 2 times, most recently from 9f60f83 to 4d7d4a9 Compare April 10, 2026 18:49
@Randy808 Randy808 requested review from philippem and shesek April 10, 2026 18:49
@Randy808 Randy808 marked this pull request as ready for review April 10, 2026 20:05
@Randy808 Randy808 requested a review from EddieHouston April 13, 2026 14:10
@shesek
Copy link
Copy Markdown
Collaborator

shesek commented Apr 14, 2026

Instead of adding the BASE_HREF to each route handler, we could put the handlers on an express Router and mount that under the BASE_HREF. Something like router = express.Router(), then change all app.{get,use}() to router.{get,use}(), and finally app.use(process.env.BASE_HREF||'/', router).

Alternatively, we could mount a pre-processing middleware that strips the BASE_HREF prefix before forwarding the request to the other handlers. Something like this (untested):

if (process.env.BASE_HREF && process.env.BASE_HREF != '/') {
  const baseHref = process.env.BASE_HREF.replace(/\/+$/, '')
  app.use((req, res, next) => {
    if (req.url == '/' || req.url == baseHref) {
      res.redirect(302, baseHref+'/')
    } else if (req.url.startsWith(baseHref+'/')) {
      req.url = req.url.slice(baseHref.length)
      next()
    } else {
      res.sendStatus(404)
    }
  })
}

Personally I've just been making sure to run the dev-server with BASE_HREF=/, with e.g. (source config1.env && source config2.env && BASE_HREF=/ npm run dev-server). But I guess it could make sense to support BASE_HREF, to make the dev-server behave more closely to the live server.

@Randy808
Copy link
Copy Markdown
Collaborator Author

Mounted router onto base path and removed prefix from individual routes

@philippem
Copy link
Copy Markdown
Collaborator

lgtm

philippem
philippem previously approved these changes Apr 20, 2026
@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

image 1. You might want to add some spacing between the input field and the clear icon; the text is overlapping the clear icon. 2. You could add `cursor: pointer` to the clear icon's hover state. 3. The placeholder no longer fits in the input field; it might be worth shortening it

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

image 1. This behavior might be expected, but when we click on the network, we get the URL `/search?q=liquid`, whereas the main site uses `/liquid`. 2. Also, when we on Liquid env, clicking on the mainnet does not return a “Not Found” page.

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

image Here, I might have made the indentation a little deeper before the circle. I might also have removed it when we're on the assets page the text highlight at the bottom extends into the circle, which doesn't look quite right in this case.

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

image It doesn't look right on a white background

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

image image 1. Review the breakpoints 2. On mobile, clicking the menu icon refreshes the page instead of opening it 3. The sidebar close button doesn't work in tablet view; this is also an issue for the prod

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 21, 2026

Otherwise, it's good - good work

@Randy808
Copy link
Copy Markdown
Collaborator Author

@FedOken

  • The clear icon comes from the default HTML input behavior rather than something custom. There isn’t currently spacing between the text and icon, so I can look into whether we can safely adjust that without overriding native styles too heavily.
  • I can also check if it’s possible to add a hover cursor to the clear icon, though I’m aiming to avoid large overrides since this PR is focused on gradually introducing the new designs rather than doing broader cleanup.
  • I’ll pass along the placeholder text feedback to design so we can keep that consistent with the intended spec.
  • The dev server behaves a bit differently from production, so it doesn’t currently support switching themes or API URLs per instance.
  • For the navbar spacing and circle issues, I’ve tried to keep changes minimal in this PR to make review easier. I did prevent the navbar text from wrapping, which can truncate "Explorer API" on smaller screens. I can look at adjusting the breakpoint address that more cleanly.

@Randy808
Copy link
Copy Markdown
Collaborator Author

Randy808 commented Apr 21, 2026

Updated PR to add proper stylings for light theme and raised the target width for nav link line wraps. I also fixed the issue of the mobile menu not closing on certain screen sizes since it only required a small change.

EDIT: Also addressed @sprihozhiy brought up regarding the page refresh when the network selector was touched on mobile

@FedOken
Copy link
Copy Markdown
Collaborator

FedOken commented Apr 22, 2026

@FedOken

  • The clear icon comes from the default HTML input behavior rather than something custom. There isn’t currently spacing between the text and icon, so I can look into whether we can safely adjust that without overriding native styles too heavily.
image
input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
    margin-left: 12px;
}
  • I can also check if it’s possible to add a hover cursor to the clear icon, though I’m aiming to avoid large overrides since this PR is focused on gradually introducing the new designs rather than doing broader cleanup.

The solution for the pointer icon above. I understand that this is a redesign overall, but we can fix the bugs related to this part.

  • I’ll pass along the placeholder text feedback to design so we can keep that consistent with the intended spec.

Ok

  • The dev server behaves a bit differently from production, so it doesn’t currently support switching themes or API URLs per instance.

Ok

  • For the navbar spacing and circle issues, I’ve tried to keep changes minimal in this PR to make review easier.

It’s up to you, but this seems a bit odd. Maybe it’s just me.

  • I did prevent the navbar text from wrapping, which can truncate "Explorer API" on smaller screens. I can look at adjusting the breakpoint address that more cleanly.

It looks better; you could also add a gap to avoid that
Before
image
After
image

*Updated PR to add proper stylings for light theme and raised the target width for nav link line wraps. I also fixed the issue of the mobile menu not closing on certain screen sizes since it only required a small change.

Looks good, thanks

*EDIT: Also addressed @sprihozhiy brought up regarding the page refresh when the network selector was touched on mobile

It's working now; I don't know if you changed anything

Comment thread client/src/views/network-selection.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s visually apparent in the UI that the two icons (Liquid and Bitcoin) are slightly different sizes. This is especially noticeable when you zoom in on them. It’s not a major issue, but it’s better to upload the icons at the exact size, without any padding.

Copy link
Copy Markdown
Collaborator Author

@Randy808 Randy808 Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-04-22 at 7 05 05 AM

There is padding around the svg for the Bitcoin icons. I may have to manually crop them using inkscape.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cropped the icons from design to fix sizing issue:
Screenshot 2026-04-22 at 1 15 52 PM
Screenshot 2026-04-22 at 1 26 15 PM

@Randy808
Copy link
Copy Markdown
Collaborator Author

@FedOken

The solution for the pointer icon above. I understand that this is a redesign overall, but we can fix the bugs related to this part.

In general, keeping PRs focused on their main purpose helps make them easier to review and avoids mixing in unrelated changes. Even small changes can be easy to overlook if they’re assumed to be directly tied to the main goal of the PR, which can introduce risk. I’ll go ahead and add the cursor to the hover icon here since it’s small and closely related.

It looks better; you could also add a gap to avoid that

The nav bar items are currently spaced using flexbox’s space-between, which works well for larger screens. I’ll incorporate your suggestion for smaller screen sizes where it can help improve the layout.

FedOken
FedOken previously approved these changes Apr 22, 2026
@Randy808
Copy link
Copy Markdown
Collaborator Author

Pushed updated commit with cropped svg icons, stylings on the search input's clear icon, and an un-commented gap on .network-hover-menu-option. The gap doesn't seem to mess with the existing stylings so I added it to the root .network-hover-menu-option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants